//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2022 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

import Foundation
import SotoCore

extension RAM {
    // MARK: Enums

    public enum ResourceOwner: String, CustomStringConvertible, Codable, _SotoSendable {
        case otherAccounts = "OTHER-ACCOUNTS"
        case _self = "SELF"
        public var description: String { return self.rawValue }
    }

    public enum ResourceRegionScope: String, CustomStringConvertible, Codable, _SotoSendable {
        case global = "GLOBAL"
        case regional = "REGIONAL"
        public var description: String { return self.rawValue }
    }

    public enum ResourceRegionScopeFilter: String, CustomStringConvertible, Codable, _SotoSendable {
        case all = "ALL"
        case global = "GLOBAL"
        case regional = "REGIONAL"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareAssociationStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case associated = "ASSOCIATED"
        case associating = "ASSOCIATING"
        case disassociated = "DISASSOCIATED"
        case disassociating = "DISASSOCIATING"
        case failed = "FAILED"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareAssociationType: String, CustomStringConvertible, Codable, _SotoSendable {
        case principal = "PRINCIPAL"
        case resource = "RESOURCE"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareFeatureSet: String, CustomStringConvertible, Codable, _SotoSendable {
        case createdFromPolicy = "CREATED_FROM_POLICY"
        case promotingToStandard = "PROMOTING_TO_STANDARD"
        case standard = "STANDARD"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareInvitationStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case accepted = "ACCEPTED"
        case expired = "EXPIRED"
        case pending = "PENDING"
        case rejected = "REJECTED"
        public var description: String { return self.rawValue }
    }

    public enum ResourceShareStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case active = "ACTIVE"
        case deleted = "DELETED"
        case deleting = "DELETING"
        case failed = "FAILED"
        case pending = "PENDING"
        public var description: String { return self.rawValue }
    }

    public enum ResourceStatus: String, CustomStringConvertible, Codable, _SotoSendable {
        case available = "AVAILABLE"
        case limitExceeded = "LIMIT_EXCEEDED"
        case pending = "PENDING"
        case unavailable = "UNAVAILABLE"
        case zonalResourceInaccessible = "ZONAL_RESOURCE_INACCESSIBLE"
        public var description: String { return self.rawValue }
    }

    // MARK: Shapes

    public struct AcceptResourceShareInvitationRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// The Amazon Resoure Name (ARN) of the invitation that you want to accept.
        public let resourceShareInvitationArn: String

        public init(clientToken: String? = nil, resourceShareInvitationArn: String) {
            self.clientToken = clientToken
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitationArn
        }
    }

    public struct AcceptResourceShareInvitationResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// An object that contains information about the specified invitation.
        public let resourceShareInvitation: ResourceShareInvitation?

        public init(clientToken: String? = nil, resourceShareInvitation: ResourceShareInvitation? = nil) {
            self.clientToken = clientToken
            self.resourceShareInvitation = resourceShareInvitation
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitation
        }
    }

    public struct AssociateResourceSharePermissionRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies the Amazon Resoure Name (ARN) of the RAM permission to associate with the resource share. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and  then choose the name of the permission. The ARN is displayed on the detail page.
        public let permissionArn: String
        /// Specifies the version of the RAM permission to associate with the resource share. If you don't specify this parameter, the operation uses the version designated as the default. You can use the ListPermissionVersions operation to discover the available versions of a permission.
        public let permissionVersion: Int?
        /// Specifies whether the specified permission should replace or add to the existing permission associated with the resource share. Use true to replace the current permissions. Use false to add the permission to the current permission. The default value is false.  A resource share can have only one permission per resource type. If a resource share already has a permission for the specified resource type and you don't set replace to true then the operation returns an error. This helps prevent accidental overwriting of a permission.
        public let replace: Bool?
        /// Specifies the Amazon Resoure Name (ARN) of the resource share to which you want to add or replace permissions.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, permissionArn: String, permissionVersion: Int? = nil, replace: Bool? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.permissionArn = permissionArn
            self.permissionVersion = permissionVersion
            self.replace = replace
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case permissionArn
            case permissionVersion
            case replace
            case resourceShareArn
        }
    }

    public struct AssociateResourceSharePermissionResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// A return value of true indicates that the request succeeded.  A value of false indicates that the request failed.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue
        }
    }

    public struct AssociateResourceShareRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies a list of principals to whom you want to the resource share. This can be null if you want to add only resources. What the principals can do with the resources in the share is determined by the RAM permissions that you associate with the resource share. See AssociateResourceSharePermission. You can include the following values:   An Amazon Web Services account ID, for example: 123456789012    An Amazon Resoure Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid    An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123    An ARN of an IAM role, for example: iam::123456789012:role/rolename    An ARN of an IAM user, for example: iam::123456789012user/username     Not all resource types can be shared with IAM roles and users.  For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
        public let principals: [String]?
        /// Specifies a list of Amazon Resource Names (ARNs) of the resources that you want to share. This can be null if you want to add only principals.
        public let resourceArns: [String]?
        /// Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add principals or resources to.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.principals = principals
            self.resourceArns = resourceArns
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case principals
            case resourceArns
            case resourceShareArn
        }
    }

    public struct AssociateResourceShareResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// An array of objects that contain information about the associations.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(clientToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.clientToken = clientToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareAssociations
        }
    }

    public struct CreateResourceShareRequest: AWSEncodableShape {
        /// Specifies whether principals outside your organization in Organizations can be associated with a resource share. A value of true lets you share with individual Amazon Web Services accounts that are not in your organization. A value of false only has meaning if your account is a member of an Amazon Web Services Organization. The default value is true.
        public let allowExternalPrincipals: Bool?
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies the name of the resource share.
        public let name: String
        /// Specifies the Amazon Resource Names (ARNs) of the RAM permission to associate with the resource share. If you do not specify an ARN for the permission, RAM automatically attaches the default version of the permission for each resource type. You can associate only one permission with each resource type included in the resource share.
        public let permissionArns: [String]?
        /// Specifies a list of one or more principals to associate with the resource share. You can include the following values:   An Amazon Web Services account ID, for example: 123456789012    An Amazon Resoure Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid    An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123    An ARN of an IAM role, for example: iam::123456789012:role/rolename    An ARN of an IAM user, for example: iam::123456789012user/username     Not all resource types can be shared with IAM roles and users.  For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
        public let principals: [String]?
        /// Specifies a list of one or more ARNs of the resources to associate with the resource share.
        public let resourceArns: [String]?
        /// Specifies one or more tags to attach to the resource share itself. It doesn't attach the tags to the resources associated with the resource share.
        public let tags: [Tag]?

        public init(allowExternalPrincipals: Bool? = nil, clientToken: String? = nil, name: String, permissionArns: [String]? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, tags: [Tag]? = nil) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.clientToken = clientToken
            self.name = name
            self.permissionArns = permissionArns
            self.principals = principals
            self.resourceArns = resourceArns
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case clientToken
            case name
            case permissionArns
            case principals
            case resourceArns
            case tags
        }
    }

    public struct CreateResourceShareResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// An object with information about the new resource share.
        public let resourceShare: ResourceShare?

        public init(clientToken: String? = nil, resourceShare: ResourceShare? = nil) {
            self.clientToken = clientToken
            self.resourceShare = resourceShare
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShare
        }
    }

    public struct DeleteResourceShareRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "clientToken", location: .querystring("clientToken")),
            AWSMemberEncoding(label: "resourceShareArn", location: .querystring("resourceShareArn"))
        ]

        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies the Amazon Resoure Name (ARN) of the resource share to delete.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct DeleteResourceShareResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// A return value of true indicates that the request succeeded.  A value of false indicates that the request failed.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue = "return"
        }
    }

    public struct DisassociateResourceSharePermissionRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// The Amazon Resoure Name (ARN) of the permission to disassociate from the resource share. Changes to permissions take effect immediately.
        public let permissionArn: String
        /// The Amazon Resoure Name (ARN) of the resource share from which you want to disassociate a permission.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, permissionArn: String, resourceShareArn: String) {
            self.clientToken = clientToken
            self.permissionArn = permissionArn
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case permissionArn
            case resourceShareArn
        }
    }

    public struct DisassociateResourceSharePermissionResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// A return value of true indicates that the request succeeded.  A value of false indicates that the request failed.
        public let returnValue: Bool?

        public init(clientToken: String? = nil, returnValue: Bool? = nil) {
            self.clientToken = clientToken
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case returnValue
        }
    }

    public struct DisassociateResourceShareRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies a list of one or more principals that no longer are to have access to the resources in this resource share. You can include the following values:   An Amazon Web Services account ID, for example: 123456789012    An Amazon Resoure Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid    An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123    An ARN of an IAM role, for example: iam::123456789012:role/rolename    An ARN of an IAM user, for example: iam::123456789012user/username     Not all resource types can be shared with IAM roles and users.  For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
        public let principals: [String]?
        /// Specifies a list of Amazon Resource Names (ARNs) for one or more resources that you want to remove from the resource share. After the operation runs, these resources are no longer shared with principals outside of the Amazon Web Services account that created the resources.
        public let resourceArns: [String]?
        /// Specifies Amazon Resoure Name (ARN) of the resource share that you want to remove resources from.
        public let resourceShareArn: String

        public init(clientToken: String? = nil, principals: [String]? = nil, resourceArns: [String]? = nil, resourceShareArn: String) {
            self.clientToken = clientToken
            self.principals = principals
            self.resourceArns = resourceArns
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case principals
            case resourceArns
            case resourceShareArn
        }
    }

    public struct DisassociateResourceShareResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// An array of objects that contain information about the updated associations for this resource share.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(clientToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.clientToken = clientToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareAssociations
        }
    }

    public struct EnableSharingWithAwsOrganizationRequest: AWSEncodableShape {
        public init() {}
    }

    public struct EnableSharingWithAwsOrganizationResponse: AWSDecodableShape {
        /// A return value of true indicates that the request succeeded.  A value of false indicates that the request failed.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue = "return"
        }
    }

    public struct GetPermissionRequest: AWSEncodableShape {
        /// Specifies the Amazon Resoure Name (ARN) of the permission whose contents you want to retrieve. To find the ARN for a permission, use either the ListPermissions operation or go to the Permissions library page in the RAM console and  then choose the name of the permission. The ARN is displayed on the detail page.
        public let permissionArn: String
        /// Specifies identifier for the version of the RAM permission to retrieve. If you don't specify this parameter, the operation retrieves the default version.
        public let permissionVersion: Int?

        public init(permissionArn: String, permissionVersion: Int? = nil) {
            self.permissionArn = permissionArn
            self.permissionVersion = permissionVersion
        }

        private enum CodingKeys: String, CodingKey {
            case permissionArn
            case permissionVersion
        }
    }

    public struct GetPermissionResponse: AWSDecodableShape {
        /// An object that contains information about the permission.
        public let permission: ResourceSharePermissionDetail?

        public init(permission: ResourceSharePermissionDetail? = nil) {
            self.permission = permission
        }

        private enum CodingKeys: String, CodingKey {
            case permission
        }
    }

    public struct GetResourcePoliciesRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies the principal.
        public let principal: String?
        /// Specifies the Amazon Resource Names (ARNs) of the resources whose policies you want to retrieve.
        public let resourceArns: [String]

        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArns: [String]) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArns = resourceArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principal
            case resourceArns
        }
    }

    public struct GetResourcePoliciesResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of resource policy documents in JSON format.
        public let policies: [String]?

        public init(nextToken: String? = nil, policies: [String]? = nil) {
            self.nextToken = nextToken
            self.policies = policies
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case policies
        }
    }

    public struct GetResourceShareAssociationsRequest: AWSEncodableShape {
        /// Specifies that you want to retrieve only associations with this status.
        public let associationStatus: ResourceShareAssociationStatus?
        /// Specifies whether you want to retrieve the associations that involve a specified resource or principal.    PRINCIPAL – list the principals that are associated with the specified resource share.    RESOURCE – list the resources that are associated with the specified resource share.
        public let associationType: ResourceShareAssociationType
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies the ID of the principal whose resource shares you want to retrieve. This can be an Amazon Web Services account ID, an organization ID, an organizational unit ID, or the Amazon Resoure Name (ARN) of an individual IAM user or role. You cannot specify this parameter if the association type is RESOURCE.
        public let principal: String?
        /// Specifies the Amazon Resoure Name (ARN) of the resource whose resource shares you want to retrieve. You cannot specify this parameter if the association type is PRINCIPAL.
        public let resourceArn: String?
        /// Specifies a list of Amazon Resource Names (ARNs) of the resource share whose associations you want to retrieve.
        public let resourceShareArns: [String]?

        public init(associationStatus: ResourceShareAssociationStatus? = nil, associationType: ResourceShareAssociationType, maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArn: String? = nil, resourceShareArns: [String]? = nil) {
            self.associationStatus = associationStatus
            self.associationType = associationType
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArn = resourceArn
            self.resourceShareArns = resourceShareArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case associationStatus
            case associationType
            case maxResults
            case nextToken
            case principal
            case resourceArn
            case resourceShareArns
        }
    }

    public struct GetResourceShareAssociationsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain the details about the associations.
        public let resourceShareAssociations: [ResourceShareAssociation]?

        public init(nextToken: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil) {
            self.nextToken = nextToken
            self.resourceShareAssociations = resourceShareAssociations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShareAssociations
        }
    }

    public struct GetResourceShareInvitationsRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want details about invitations only for the resource shares described by this list of Amazon Resource Names (ARNs)
        public let resourceShareArns: [String]?
        /// Specifies the Amazon Resource Names (ARNs) of the resource share invitations you want information about.
        public let resourceShareInvitationArns: [String]?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceShareArns: [String]? = nil, resourceShareInvitationArns: [String]? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareArns = resourceShareArns
            self.resourceShareInvitationArns = resourceShareInvitationArns
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceShareArns
            case resourceShareInvitationArns
        }
    }

    public struct GetResourceShareInvitationsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain the details about the invitations.
        public let resourceShareInvitations: [ResourceShareInvitation]?

        public init(nextToken: String? = nil, resourceShareInvitations: [ResourceShareInvitation]? = nil) {
            self.nextToken = nextToken
            self.resourceShareInvitations = resourceShareInvitations
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShareInvitations
        }
    }

    public struct GetResourceSharesRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies the name of an individual resource share that you want to retrieve details about.
        public let name: String?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want to retrieve details of only those resource shares that use the RAM permission with this Amazon Resoure Name (ARN).
        public let permissionArn: String?
        /// Specifies that you want to retrieve details of only those resource shares that match the following:     SELF – resource shares that your account shares with other accounts     OTHER-ACCOUNTS – resource shares that other accounts share with your account
        public let resourceOwner: ResourceOwner
        /// Specifies the Amazon Resource Names (ARNs) of individual resource shares that you want information about.
        public let resourceShareArns: [String]?
        /// Specifies that you want to retrieve details of only those resource shares that have this status.
        public let resourceShareStatus: ResourceShareStatus?
        /// Specifies that you want to retrieve details of only those resource shares that match the specified tag keys and values.
        public let tagFilters: [TagFilter]?

        public init(maxResults: Int? = nil, name: String? = nil, nextToken: String? = nil, permissionArn: String? = nil, resourceOwner: ResourceOwner, resourceShareArns: [String]? = nil, resourceShareStatus: ResourceShareStatus? = nil, tagFilters: [TagFilter]? = nil) {
            self.maxResults = maxResults
            self.name = name
            self.nextToken = nextToken
            self.permissionArn = permissionArn
            self.resourceOwner = resourceOwner
            self.resourceShareArns = resourceShareArns
            self.resourceShareStatus = resourceShareStatus
            self.tagFilters = tagFilters
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case name
            case nextToken
            case permissionArn
            case resourceOwner
            case resourceShareArns
            case resourceShareStatus
            case tagFilters
        }
    }

    public struct GetResourceSharesResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain the information about the resource shares.
        public let resourceShares: [ResourceShare]?

        public init(nextToken: String? = nil, resourceShares: [ResourceShare]? = nil) {
            self.nextToken = nextToken
            self.resourceShares = resourceShares
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceShares
        }
    }

    public struct ListPendingInvitationResourcesRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want the results to include only  resources that have the specified scope.    ALL – the results include both global and  regional resources or resource types.    GLOBAL – the results include only global  resources or resource types.    REGIONAL – the results include only regional  resources or resource types.   The default value is ALL.
        public let resourceRegionScope: ResourceRegionScopeFilter?
        /// Specifies the Amazon Resoure Name (ARN) of the invitation. You can use GetResourceShareInvitations to find the ARN of the invitation.
        public let resourceShareInvitationArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceRegionScope: ResourceRegionScopeFilter? = nil, resourceShareInvitationArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceRegionScope = resourceRegionScope
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceRegionScope
            case resourceShareInvitationArn
        }
    }

    public struct ListPendingInvitationResourcesResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain the information about the resources included the specified resource share.
        public let resources: [Resource]?

        public init(nextToken: String? = nil, resources: [Resource]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct ListPermissionVersionsRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies the Amazon Resoure Name (ARN) of the RAM permission whose versions you want to list. You can use the permissionVersion parameter on the AssociateResourceSharePermission operation to specify a non-default version to attach.
        public let permissionArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, permissionArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.permissionArn = permissionArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case permissionArn
        }
    }

    public struct ListPermissionVersionsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain details for each of the available versions.
        public let permissions: [ResourceSharePermissionSummary]?

        public init(nextToken: String? = nil, permissions: [ResourceSharePermissionSummary]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case permissions
        }
    }

    public struct ListPermissionsRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want to list permissions for only the specified resource type. For example, to list only permissions that apply to EC2 subnets, specify ec2:Subnet. You can use the ListResourceTypes operation to get the specific string required.
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceType
        }
    }

    public struct ListPermissionsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects with information about the permissions.
        public let permissions: [ResourceSharePermissionSummary]?

        public init(nextToken: String? = nil, permissions: [ResourceSharePermissionSummary]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case permissions
        }
    }

    public struct ListPrincipalsRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want to list information for only the listed principals. You can include the following values:   An Amazon Web Services account ID, for example: 123456789012    An Amazon Resoure Name (ARN) of an organization in Organizations, for example: organizations::123456789012:organization/o-exampleorgid    An ARN of an organizational unit (OU) in Organizations, for example: organizations::123456789012:ou/o-exampleorgid/ou-examplerootid-exampleouid123    An ARN of an IAM role, for example: iam::123456789012:role/rolename    An ARN of an IAM user, for example: iam::123456789012user/username     Not all resource types can be shared with IAM roles and users.  For more information, see Sharing with IAM roles and users in the Resource Access Manager User Guide.
        public let principals: [String]?
        /// Specifies that you want to list principal information for the resource share with the specified Amazon Resoure Name (ARN).
        public let resourceArn: String?
        /// Specifies that you want to list information for only resource shares that match the following:     SELF – principals that your account is sharing resources with     OTHER-ACCOUNTS – principals that are sharing resources with your account
        public let resourceOwner: ResourceOwner
        /// Specifies that you want to list information for only principals associated with the resource shares specified by a list the Amazon Resource Names (ARNs).
        public let resourceShareArns: [String]?
        /// Specifies that you want to list information for only principals associated with resource shares that include the specified resource type. For a list of valid values, query the ListResourceTypes operation.
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, principals: [String]? = nil, resourceArn: String? = nil, resourceOwner: ResourceOwner, resourceShareArns: [String]? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principals = principals
            self.resourceArn = resourceArn
            self.resourceOwner = resourceOwner
            self.resourceShareArns = resourceShareArns
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principals
            case resourceArn
            case resourceOwner
            case resourceShareArns
            case resourceType
        }
    }

    public struct ListPrincipalsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain the details about the principals.
        public let principals: [Principal]?

        public init(nextToken: String? = nil, principals: [Principal]? = nil) {
            self.nextToken = nextToken
            self.principals = principals
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case principals
        }
    }

    public struct ListResourceSharePermissionsRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies the Amazon Resoure Name (ARN) of the resource share for which you want to retrieve the associated permissions.
        public let resourceShareArn: String

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceShareArn: String) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceShareArn = resourceShareArn
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceShareArn
        }
    }

    public struct ListResourceSharePermissionsResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that describe the permissions associated with the resource share.
        public let permissions: [ResourceSharePermissionSummary]?

        public init(nextToken: String? = nil, permissions: [ResourceSharePermissionSummary]? = nil) {
            self.nextToken = nextToken
            self.permissions = permissions
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case permissions
        }
    }

    public struct ListResourceTypesRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want the results to include only  resources that have the specified scope.    ALL – the results include both global and  regional resources or resource types.    GLOBAL – the results include only global  resources or resource types.    REGIONAL – the results include only regional  resources or resource types.   The default value is ALL.
        public let resourceRegionScope: ResourceRegionScopeFilter?

        public init(maxResults: Int? = nil, nextToken: String? = nil, resourceRegionScope: ResourceRegionScopeFilter? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.resourceRegionScope = resourceRegionScope
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case resourceRegionScope
        }
    }

    public struct ListResourceTypesResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain information about the resource types that can be shared using RAM.
        public let resourceTypes: [ServiceNameAndResourceType]?

        public init(nextToken: String? = nil, resourceTypes: [ServiceNameAndResourceType]? = nil) {
            self.nextToken = nextToken
            self.resourceTypes = resourceTypes
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resourceTypes
        }
    }

    public struct ListResourcesRequest: AWSEncodableShape {
        /// Specifies the total number of results that you want included on each page  of the response. If you do not include this parameter, it defaults to a value that is  specific to the operation. If additional items exist beyond the number you specify, the NextToken response element is returned with a value (not null). Include the specified value as the NextToken request parameter in the next  call to the operation to get the next part of the results. Note that the service might  return fewer results than the maximum even when there are more results available. You  should check NextToken after every operation to ensure that you receive all of the results.
        public let maxResults: Int?
        /// Specifies that you want to receive the next page of results. Valid  only if you received a NextToken response in the previous request. If you did, it indicates that more output is available. Set this parameter to the value  provided by the previous call's NextToken response to request the  next page of results.
        public let nextToken: String?
        /// Specifies that you want to list only the resource shares that are associated with the specified principal.
        public let principal: String?
        /// Specifies that you want to list only the resource shares that include resources with the specified Amazon Resource Names (ARNs).
        public let resourceArns: [String]?
        /// Specifies that you want to list only the resource shares that match the following:     SELF – resources that your account shares with other accounts     OTHER-ACCOUNTS – resources that other accounts share with your account
        public let resourceOwner: ResourceOwner
        /// Specifies that you want the results to include only  resources that have the specified scope.    ALL – the results include both global and  regional resources or resource types.    GLOBAL – the results include only global  resources or resource types.    REGIONAL – the results include only regional  resources or resource types.   The default value is ALL.
        public let resourceRegionScope: ResourceRegionScopeFilter?
        /// Specifies that you want to list only resources in the resource shares identified by the specified Amazon Resource Names (ARNs).
        public let resourceShareArns: [String]?
        /// Specifies that you want to list only the resource shares that include resources of the specified resource type. For valid values, query the ListResourceTypes operation.
        public let resourceType: String?

        public init(maxResults: Int? = nil, nextToken: String? = nil, principal: String? = nil, resourceArns: [String]? = nil, resourceOwner: ResourceOwner, resourceRegionScope: ResourceRegionScopeFilter? = nil, resourceShareArns: [String]? = nil, resourceType: String? = nil) {
            self.maxResults = maxResults
            self.nextToken = nextToken
            self.principal = principal
            self.resourceArns = resourceArns
            self.resourceOwner = resourceOwner
            self.resourceRegionScope = resourceRegionScope
            self.resourceShareArns = resourceShareArns
            self.resourceType = resourceType
        }

        public func validate(name: String) throws {
            try self.validate(self.maxResults, name: "maxResults", parent: name, max: 500)
            try self.validate(self.maxResults, name: "maxResults", parent: name, min: 1)
        }

        private enum CodingKeys: String, CodingKey {
            case maxResults
            case nextToken
            case principal
            case resourceArns
            case resourceOwner
            case resourceRegionScope
            case resourceShareArns
            case resourceType
        }
    }

    public struct ListResourcesResponse: AWSDecodableShape {
        /// If present, this value indicates that more output is available than  is included in the current response. Use this value in the NextToken  request parameter in a subsequent call to the operation to get the next part of the  output. You should repeat this until the NextToken response element comes  back as null. This indicates that this is the last page of results.
        public let nextToken: String?
        /// An array of objects that contain information about the resources.
        public let resources: [Resource]?

        public init(nextToken: String? = nil, resources: [Resource]? = nil) {
            self.nextToken = nextToken
            self.resources = resources
        }

        private enum CodingKeys: String, CodingKey {
            case nextToken
            case resources
        }
    }

    public struct Principal: AWSDecodableShape {
        /// The date and time when the principal was associated with the resource share.
        public let creationTime: Date?
        /// Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
        public let external: Bool?
        /// The ID of the principal.
        public let id: String?
        /// The date and time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Resoure Name (ARN) of a resource share the principal is associated with.
        public let resourceShareArn: String?

        public init(creationTime: Date? = nil, external: Bool? = nil, id: String? = nil, lastUpdatedTime: Date? = nil, resourceShareArn: String? = nil) {
            self.creationTime = creationTime
            self.external = external
            self.id = id
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case creationTime
            case external
            case id
            case lastUpdatedTime
            case resourceShareArn
        }
    }

    public struct PromoteResourceShareCreatedFromPolicyRequest: AWSEncodableShape {
        public static var _encoding = [
            AWSMemberEncoding(label: "resourceShareArn", location: .querystring("resourceShareArn"))
        ]

        /// Specifies the Amazon Resoure Name (ARN) of the resource share to promote.
        public let resourceShareArn: String

        public init(resourceShareArn: String) {
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: CodingKey {}
    }

    public struct PromoteResourceShareCreatedFromPolicyResponse: AWSDecodableShape {
        /// A return value of true indicates that the request succeeded.  A value of false indicates that the request failed.
        public let returnValue: Bool?

        public init(returnValue: Bool? = nil) {
            self.returnValue = returnValue
        }

        private enum CodingKeys: String, CodingKey {
            case returnValue = "return"
        }
    }

    public struct RejectResourceShareInvitationRequest: AWSEncodableShape {
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// Specifies the Amazon Resoure Name (ARN) of the invitation that you want to reject.
        public let resourceShareInvitationArn: String

        public init(clientToken: String? = nil, resourceShareInvitationArn: String) {
            self.clientToken = clientToken
            self.resourceShareInvitationArn = resourceShareInvitationArn
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitationArn
        }
    }

    public struct RejectResourceShareInvitationResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// An object that contains the details about the rejected invitation.
        public let resourceShareInvitation: ResourceShareInvitation?

        public init(clientToken: String? = nil, resourceShareInvitation: ResourceShareInvitation? = nil) {
            self.clientToken = clientToken
            self.resourceShareInvitation = resourceShareInvitation
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShareInvitation
        }
    }

    public struct Resource: AWSDecodableShape {
        /// The Amazon Resoure Name (ARN) of the resource.
        public let arn: String?
        /// The date and time when the resource was associated with the resource share.
        public let creationTime: Date?
        /// The date an time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Resoure Name (ARN) of the resource group. This value is available only if the resource is part of a resource group.
        public let resourceGroupArn: String?
        /// Specifies the scope of visibility of this resource:    REGIONAL – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.    GLOBAL – The resource can be accessed from any Amazon Web Services Region.
        public let resourceRegionScope: ResourceRegionScope?
        /// The Amazon Resoure Name (ARN) of the resource share this resource is associated with.
        public let resourceShareArn: String?
        /// The current status of the resource.
        public let status: ResourceStatus?
        /// A message about the status of the resource.
        public let statusMessage: String?
        /// The resource type. This takes the form of: service-code:resource-code
        public let type: String?

        public init(arn: String? = nil, creationTime: Date? = nil, lastUpdatedTime: Date? = nil, resourceGroupArn: String? = nil, resourceRegionScope: ResourceRegionScope? = nil, resourceShareArn: String? = nil, status: ResourceStatus? = nil, statusMessage: String? = nil, type: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceGroupArn = resourceGroupArn
            self.resourceRegionScope = resourceRegionScope
            self.resourceShareArn = resourceShareArn
            self.status = status
            self.statusMessage = statusMessage
            self.type = type
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case lastUpdatedTime
            case resourceGroupArn
            case resourceRegionScope
            case resourceShareArn
            case status
            case statusMessage
            case type
        }
    }

    public struct ResourceShare: AWSDecodableShape {
        /// Indicates whether principals outside your organization in Organizations can be associated with a resource share.
        public let allowExternalPrincipals: Bool?
        /// The date and time when the resource share was created.
        public let creationTime: Date?
        /// Indicates how the resource share was created. Possible values include:    CREATED_FROM_POLICY - Indicates that the resource share was created from an Identity and Access Management (IAM) resource-based permission policy attached to the resource. This type of resource share is visible only to the Amazon Web Services account that created it. You can't modify it in RAM unless you promote it. For more information, see PromoteResourceShareCreatedFromPolicy.    PROMOTING_TO_STANDARD - The resource share is in the process of being promoted. For more information, see PromoteResourceShareCreatedFromPolicy.    STANDARD - Indicates that the resource share was created in RAM using the console or APIs. These resource shares are visible to all principals you share the resource share with. You can modify these resource shares in RAM using the console or APIs.
        public let featureSet: ResourceShareFeatureSet?
        /// The date and time when the resource share was last updated.
        public let lastUpdatedTime: Date?
        /// The name of the resource share.
        public let name: String?
        /// The ID of the Amazon Web Services account that owns the resource share.
        public let owningAccountId: String?
        /// The Amazon Resoure Name (ARN) of the resource share
        public let resourceShareArn: String?
        /// The current status of the resource share.
        public let status: ResourceShareStatus?
        /// A message about the status of the resource share.
        public let statusMessage: String?
        /// The tag key and value pairs attached to the resource share.
        public let tags: [Tag]?

        public init(allowExternalPrincipals: Bool? = nil, creationTime: Date? = nil, featureSet: ResourceShareFeatureSet? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, owningAccountId: String? = nil, resourceShareArn: String? = nil, status: ResourceShareStatus? = nil, statusMessage: String? = nil, tags: [Tag]? = nil) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.creationTime = creationTime
            self.featureSet = featureSet
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.owningAccountId = owningAccountId
            self.resourceShareArn = resourceShareArn
            self.status = status
            self.statusMessage = statusMessage
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case creationTime
            case featureSet
            case lastUpdatedTime
            case name
            case owningAccountId
            case resourceShareArn
            case status
            case statusMessage
            case tags
        }
    }

    public struct ResourceShareAssociation: AWSDecodableShape {
        /// The associated entity. This can be either of the following:   For a resource association, this is the Amazon Resoure Name (ARN) of the resource.   For principal associations, this is one of the following:   The ID of an Amazon Web Services account   The Amazon Resoure Name (ARN) of an organization in Organizations   The ARN of an organizational unit (OU) in Organizations   The ARN of an IAM role   The ARN of an IAM user
        public let associatedEntity: String?
        /// The type of entity included in this association.
        public let associationType: ResourceShareAssociationType?
        /// The date and time when the association was created.
        public let creationTime: Date?
        /// Indicates whether the principal belongs to the same organization in Organizations as the Amazon Web Services account that owns the resource share.
        public let external: Bool?
        /// The date and time when the association was last updated.
        public let lastUpdatedTime: Date?
        /// The Amazon Resoure Name (ARN) of the resource share.
        public let resourceShareArn: String?
        /// The name of the resource share.
        public let resourceShareName: String?
        /// The current status of the association.
        public let status: ResourceShareAssociationStatus?
        /// A message about the status of the association.
        public let statusMessage: String?

        public init(associatedEntity: String? = nil, associationType: ResourceShareAssociationType? = nil, creationTime: Date? = nil, external: Bool? = nil, lastUpdatedTime: Date? = nil, resourceShareArn: String? = nil, resourceShareName: String? = nil, status: ResourceShareAssociationStatus? = nil, statusMessage: String? = nil) {
            self.associatedEntity = associatedEntity
            self.associationType = associationType
            self.creationTime = creationTime
            self.external = external
            self.lastUpdatedTime = lastUpdatedTime
            self.resourceShareArn = resourceShareArn
            self.resourceShareName = resourceShareName
            self.status = status
            self.statusMessage = statusMessage
        }

        private enum CodingKeys: String, CodingKey {
            case associatedEntity
            case associationType
            case creationTime
            case external
            case lastUpdatedTime
            case resourceShareArn
            case resourceShareName
            case status
            case statusMessage
        }
    }

    public struct ResourceShareInvitation: AWSDecodableShape {
        /// The date and time when the invitation was sent.
        public let invitationTimestamp: Date?
        /// The ID of the Amazon Web Services account that received the invitation.
        public let receiverAccountId: String?
        /// The Amazon Resoure Name (ARN) of the IAM user or role that received the invitation.
        public let receiverArn: String?
        /// The Amazon Resoure Name (ARN) of the resource share
        public let resourceShareArn: String?
        /// To view the resources associated with a pending resource share invitation, use ListPendingInvitationResources.
        public let resourceShareAssociations: [ResourceShareAssociation]?
        /// The Amazon Resoure Name (ARN) of the invitation.
        public let resourceShareInvitationArn: String?
        /// The name of the resource share.
        public let resourceShareName: String?
        /// The ID of the Amazon Web Services account that sent the invitation.
        public let senderAccountId: String?
        /// The current status of the invitation.
        public let status: ResourceShareInvitationStatus?

        public init(invitationTimestamp: Date? = nil, receiverAccountId: String? = nil, receiverArn: String? = nil, resourceShareArn: String? = nil, resourceShareInvitationArn: String? = nil, resourceShareName: String? = nil, senderAccountId: String? = nil, status: ResourceShareInvitationStatus? = nil) {
            self.invitationTimestamp = invitationTimestamp
            self.receiverAccountId = receiverAccountId
            self.receiverArn = receiverArn
            self.resourceShareArn = resourceShareArn
            self.resourceShareAssociations = nil
            self.resourceShareInvitationArn = resourceShareInvitationArn
            self.resourceShareName = resourceShareName
            self.senderAccountId = senderAccountId
            self.status = status
        }

        @available(*, deprecated, message: "Members resourceShareAssociations have been deprecated")
        public init(invitationTimestamp: Date? = nil, receiverAccountId: String? = nil, receiverArn: String? = nil, resourceShareArn: String? = nil, resourceShareAssociations: [ResourceShareAssociation]? = nil, resourceShareInvitationArn: String? = nil, resourceShareName: String? = nil, senderAccountId: String? = nil, status: ResourceShareInvitationStatus? = nil) {
            self.invitationTimestamp = invitationTimestamp
            self.receiverAccountId = receiverAccountId
            self.receiverArn = receiverArn
            self.resourceShareArn = resourceShareArn
            self.resourceShareAssociations = resourceShareAssociations
            self.resourceShareInvitationArn = resourceShareInvitationArn
            self.resourceShareName = resourceShareName
            self.senderAccountId = senderAccountId
            self.status = status
        }

        private enum CodingKeys: String, CodingKey {
            case invitationTimestamp
            case receiverAccountId
            case receiverArn
            case resourceShareArn
            case resourceShareAssociations
            case resourceShareInvitationArn
            case resourceShareName
            case senderAccountId
            case status
        }
    }

    public struct ResourceSharePermissionDetail: AWSDecodableShape {
        /// The Amazon Resoure Name (ARN) of this RAM permission.
        public let arn: String?
        /// The date and time when the permission was created.
        public let creationTime: Date?
        /// Specifies whether the version of the permission represented in this structure is the default version for this permission.
        public let defaultVersion: Bool?
        /// Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
        public let isResourceTypeDefault: Bool?
        /// The date and time when the permission was last updated.
        public let lastUpdatedTime: Date?
        /// The name of this permission.
        public let name: String?
        /// The permission's effect and actions in JSON format. The effect indicates whether the specified actions are allowed or denied. The actions list the operations to which the principal is granted or denied access.
        public let permission: String?
        /// The resource type to which this permission applies.
        public let resourceType: String?
        /// The version of the permission represented in this structure.
        public let version: String?

        public init(arn: String? = nil, creationTime: Date? = nil, defaultVersion: Bool? = nil, isResourceTypeDefault: Bool? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, permission: String? = nil, resourceType: String? = nil, version: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.defaultVersion = defaultVersion
            self.isResourceTypeDefault = isResourceTypeDefault
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.permission = permission
            self.resourceType = resourceType
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case defaultVersion
            case isResourceTypeDefault
            case lastUpdatedTime
            case name
            case permission
            case resourceType
            case version
        }
    }

    public struct ResourceSharePermissionSummary: AWSDecodableShape {
        /// The Amazon Resoure Name (ARN) of the permission you want information about.
        public let arn: String?
        /// The date and time when the permission was created.
        public let creationTime: Date?
        /// Specifies whether the version of the permission represented in this structure is the default version for this permission.
        public let defaultVersion: Bool?
        /// Specifies whether the version of the permission represented in this structure is the default version for all resources of this resource type.
        public let isResourceTypeDefault: Bool?
        /// The date and time when the permission was last updated.
        public let lastUpdatedTime: Date?
        /// The name of this permission.
        public let name: String?
        /// The type of resource to which this permission applies.
        public let resourceType: String?
        /// The current status of the permission.
        public let status: String?
        /// The version of the permission represented in this structure.
        public let version: String?

        public init(arn: String? = nil, creationTime: Date? = nil, defaultVersion: Bool? = nil, isResourceTypeDefault: Bool? = nil, lastUpdatedTime: Date? = nil, name: String? = nil, resourceType: String? = nil, status: String? = nil, version: String? = nil) {
            self.arn = arn
            self.creationTime = creationTime
            self.defaultVersion = defaultVersion
            self.isResourceTypeDefault = isResourceTypeDefault
            self.lastUpdatedTime = lastUpdatedTime
            self.name = name
            self.resourceType = resourceType
            self.status = status
            self.version = version
        }

        private enum CodingKeys: String, CodingKey {
            case arn
            case creationTime
            case defaultVersion
            case isResourceTypeDefault
            case lastUpdatedTime
            case name
            case resourceType
            case status
            case version
        }
    }

    public struct ServiceNameAndResourceType: AWSDecodableShape {
        /// Specifies the scope of visibility of resources of this type:    REGIONAL – The resource can be accessed only by using requests that target the Amazon Web Services Region in which the resource exists.    GLOBAL – The resource can be accessed from any Amazon Web Services Region.
        public let resourceRegionScope: ResourceRegionScope?
        /// The type of the resource.
        public let resourceType: String?
        /// The name of the Amazon Web Services service to which resources of this type belong.
        public let serviceName: String?

        public init(resourceRegionScope: ResourceRegionScope? = nil, resourceType: String? = nil, serviceName: String? = nil) {
            self.resourceRegionScope = resourceRegionScope
            self.resourceType = resourceType
            self.serviceName = serviceName
        }

        private enum CodingKeys: String, CodingKey {
            case resourceRegionScope
            case resourceType
            case serviceName
        }
    }

    public struct Tag: AWSEncodableShape & AWSDecodableShape {
        /// The key, or name, attached to the tag. Every tag must have a key. Key names are case sensitive.
        public let key: String?
        /// The string value attached to the tag. The value can be an empty string. Key values are case sensitive.
        public let value: String?

        public init(key: String? = nil, value: String? = nil) {
            self.key = key
            self.value = value
        }

        private enum CodingKeys: String, CodingKey {
            case key
            case value
        }
    }

    public struct TagFilter: AWSEncodableShape {
        /// The tag key. This must have a valid string value and can't be empty.
        public let tagKey: String?
        /// A list of zero or more tag values. If no values are provided, then the filter matches any tag with the specified key, regardless of its value.
        public let tagValues: [String]?

        public init(tagKey: String? = nil, tagValues: [String]? = nil) {
            self.tagKey = tagKey
            self.tagValues = tagValues
        }

        private enum CodingKeys: String, CodingKey {
            case tagKey
            case tagValues
        }
    }

    public struct TagResourceRequest: AWSEncodableShape {
        /// Specifies the Amazon Resoure Name (ARN) of the resource share that you want to add tags to.
        public let resourceShareArn: String
        /// A list of one or more tag key and value pairs. The tag key must be present and not be an empty string. The tag value must be present but can be an empty string.
        public let tags: [Tag]

        public init(resourceShareArn: String, tags: [Tag]) {
            self.resourceShareArn = resourceShareArn
            self.tags = tags
        }

        private enum CodingKeys: String, CodingKey {
            case resourceShareArn
            case tags
        }
    }

    public struct TagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UntagResourceRequest: AWSEncodableShape {
        /// Specifies the Amazon Resoure Name (ARN) of the resource share that you want to remove tags from. The tags are removed from the resource share, not the resources in the resource share.
        public let resourceShareArn: String
        /// Specifies a list of one or more tag keys that you want to remove.
        public let tagKeys: [String]

        public init(resourceShareArn: String, tagKeys: [String]) {
            self.resourceShareArn = resourceShareArn
            self.tagKeys = tagKeys
        }

        private enum CodingKeys: String, CodingKey {
            case resourceShareArn
            case tagKeys
        }
    }

    public struct UntagResourceResponse: AWSDecodableShape {
        public init() {}
    }

    public struct UpdateResourceShareRequest: AWSEncodableShape {
        /// Specifies whether principals outside your organization in Organizations can be associated with a resource share.
        public let allowExternalPrincipals: Bool?
        /// Specifies a unique, case-sensitive identifier that you provide to ensure the idempotency of the request. This lets you safely retry the request without accidentally performing the same operation a second time. Passing the same value to a later call to an operation requires that you also pass the same value for all other  parameters. We recommend that you use a UUID type of  value.. If you don't provide this value, then Amazon Web Services generates a random one for you.
        public let clientToken: String?
        /// If specified, the new name that you want to attach to the resource share.
        public let name: String?
        /// Specifies the Amazon Resoure Name (ARN) of the resource share that you want to modify.
        public let resourceShareArn: String

        public init(allowExternalPrincipals: Bool? = nil, clientToken: String? = nil, name: String? = nil, resourceShareArn: String) {
            self.allowExternalPrincipals = allowExternalPrincipals
            self.clientToken = clientToken
            self.name = name
            self.resourceShareArn = resourceShareArn
        }

        private enum CodingKeys: String, CodingKey {
            case allowExternalPrincipals
            case clientToken
            case name
            case resourceShareArn
        }
    }

    public struct UpdateResourceShareResponse: AWSDecodableShape {
        /// The idempotency identifier associated with this request. If you want to repeat the same operation in an idempotent manner then you must include this value in the clientToken request parameter of that later call. All other  parameters must also have the same values that you used in the first call.
        public let clientToken: String?
        /// Information about the resource share.
        public let resourceShare: ResourceShare?

        public init(clientToken: String? = nil, resourceShare: ResourceShare? = nil) {
            self.clientToken = clientToken
            self.resourceShare = resourceShare
        }

        private enum CodingKeys: String, CodingKey {
            case clientToken
            case resourceShare
        }
    }
}

// MARK: - Errors

/// Error enum for RAM
public struct RAMErrorType: AWSErrorType {
    enum Code: String {
        case idempotentParameterMismatchException = "IdempotentParameterMismatchException"
        case invalidClientTokenException = "InvalidClientTokenException"
        case invalidMaxResultsException = "InvalidMaxResultsException"
        case invalidNextTokenException = "InvalidNextTokenException"
        case invalidParameterException = "InvalidParameterException"
        case invalidResourceTypeException = "InvalidResourceTypeException"
        case invalidStateTransitionException = "InvalidStateTransitionException"
        case malformedArnException = "MalformedArnException"
        case missingRequiredParameterException = "MissingRequiredParameterException"
        case operationNotPermittedException = "OperationNotPermittedException"
        case resourceArnNotFoundException = "ResourceArnNotFoundException"
        case resourceShareInvitationAlreadyAcceptedException = "ResourceShareInvitationAlreadyAcceptedException"
        case resourceShareInvitationAlreadyRejectedException = "ResourceShareInvitationAlreadyRejectedException"
        case resourceShareInvitationArnNotFoundException = "ResourceShareInvitationArnNotFoundException"
        case resourceShareInvitationExpiredException = "ResourceShareInvitationExpiredException"
        case resourceShareLimitExceededException = "ResourceShareLimitExceededException"
        case serverInternalException = "ServerInternalException"
        case serviceUnavailableException = "ServiceUnavailableException"
        case tagLimitExceededException = "TagLimitExceededException"
        case tagPolicyViolationException = "TagPolicyViolationException"
        case throttlingException = "ThrottlingException"
        case unknownResourceException = "UnknownResourceException"
    }

    private let error: Code
    public let context: AWSErrorContext?

    /// initialize RAM
    public init?(errorCode: String, context: AWSErrorContext) {
        guard let error = Code(rawValue: errorCode) else { return nil }
        self.error = error
        self.context = context
    }

    internal init(_ error: Code) {
        self.error = error
        self.context = nil
    }

    /// return error code string
    public var errorCode: String { self.error.rawValue }

    /// The client token input parameter was matched one used with a previous call to the operation, but at least one of the other input parameters is different from the previous call.
    public static var idempotentParameterMismatchException: Self { .init(.idempotentParameterMismatchException) }
    /// The client token is not valid.
    public static var invalidClientTokenException: Self { .init(.invalidClientTokenException) }
    /// The specified value for MaxResults is not valid.
    public static var invalidMaxResultsException: Self { .init(.invalidMaxResultsException) }
    /// The specified value for NextToken is not valid.
    public static var invalidNextTokenException: Self { .init(.invalidNextTokenException) }
    /// A parameter is not valid.
    public static var invalidParameterException: Self { .init(.invalidParameterException) }
    /// The specified resource type is not valid.
    public static var invalidResourceTypeException: Self { .init(.invalidResourceTypeException) }
    /// The requested state transition is not valid.
    public static var invalidStateTransitionException: Self { .init(.invalidStateTransitionException) }
    /// The format of an Amazon Resource Name (ARN) is not valid.
    public static var malformedArnException: Self { .init(.malformedArnException) }
    /// A required input parameter is missing.
    public static var missingRequiredParameterException: Self { .init(.missingRequiredParameterException) }
    /// The requested operation is not permitted.
    public static var operationNotPermittedException: Self { .init(.operationNotPermittedException) }
    /// The specified Amazon Resource Name (ARN) was not found.
    public static var resourceArnNotFoundException: Self { .init(.resourceArnNotFoundException) }
    /// The specified invitation was already accepted.
    public static var resourceShareInvitationAlreadyAcceptedException: Self { .init(.resourceShareInvitationAlreadyAcceptedException) }
    /// The specified invitation was already rejected.
    public static var resourceShareInvitationAlreadyRejectedException: Self { .init(.resourceShareInvitationAlreadyRejectedException) }
    /// The specified Amazon Resource Name (ARN) for an invitation was not found.
    public static var resourceShareInvitationArnNotFoundException: Self { .init(.resourceShareInvitationArnNotFoundException) }
    /// The specified invitation is expired.
    public static var resourceShareInvitationExpiredException: Self { .init(.resourceShareInvitationExpiredException) }
    /// This request would exceed the limit for resource shares for your account.
    public static var resourceShareLimitExceededException: Self { .init(.resourceShareLimitExceededException) }
    /// The service could not respond to the request due to an internal problem.
    public static var serverInternalException: Self { .init(.serverInternalException) }
    /// The service is not available.
    public static var serviceUnavailableException: Self { .init(.serviceUnavailableException) }
    /// This request would exceed the limit for tags for your account.
    public static var tagLimitExceededException: Self { .init(.tagLimitExceededException) }
    /// The specified tag key is a reserved word and can&#39;t be used.
    public static var tagPolicyViolationException: Self { .init(.tagPolicyViolationException) }
    /// You exceeded the rate at which you are allowed to perform this operation. Please try again later.
    public static var throttlingException: Self { .init(.throttlingException) }
    /// A specified resource was not found.
    public static var unknownResourceException: Self { .init(.unknownResourceException) }
}

extension RAMErrorType: Equatable {
    public static func == (lhs: RAMErrorType, rhs: RAMErrorType) -> Bool {
        lhs.error == rhs.error
    }
}

extension RAMErrorType: CustomStringConvertible {
    public var description: String {
        return "\(self.error.rawValue): \(self.message ?? "")"
    }
}
